modemmanager: always reset the init_eps if not configured
authorFlorian Eckert <[email protected]>
Thu, 7 Aug 2025 10:22:24 +0000 (12:22 +0200)
committerFlorian Eckert <[email protected]>
Thu, 4 Sep 2025 06:35:09 +0000 (08:35 +0200)
The initial EPS is stored on the modem side. When establishing a connection,
it must therefore be deleted if no EPS has been configured. This is because
the system does not know whether one was configured previously.

Signed-off-by: Florian Eckert <[email protected]>
net/modemmanager/files/lib/netifd/proto/modemmanager.sh

index 8ed94c5084c437e03fa343b97162ff83264c7a2d..f3ee7c8b624405743371cac88487e7701646ed25 100644 (file)
@@ -629,13 +629,10 @@ proto_modemmanager_setup() {
        }
 
        # set initial eps bearer settings
-       [ -z "${init_epsbearer}" ] || {
+       if [ -z "${init_epsbearer}" ]; then
+               modemmanager_init_epsbearer "none" "$device" "" "$apn"
+       else
                case "$init_epsbearer" in
-                       "none")
-                               connectargs=""
-                               modemmanager_init_epsbearer "none" \
-                                       "$device" "${connectargs}" "$apn"
-                               ;;
                        "default")
                                cliauth=""
                                for auth in $allowedauth; do
@@ -667,7 +664,7 @@ proto_modemmanager_setup() {
                esac
                # check error for init_epsbearer function call
                [ "$?" -ne "0" ] && return 1
-       }
+       fi
 
        if [ -z "${allowedmode}" ]; then
                modemmanager_set_allowed_mode "$device" "$interface" "any"